﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAL;

namespace BL
{
    public class SanPhamBL
    {
        SanPhamQuery sanPham = new SanPhamQuery();
        public List<SanPhamDAL> LayDanhSachSanPham()
        {
            return sanPham.LayDanhSachSanPham();
        }

        public List<SanPhamDAL> LayDanhSachSanPhamKhuyenMai()
        {
            return sanPham.LayDanhSachSanPhamKhuyenMai();
        }

        public List<SanPhamDAL> LayDanhSachSanPhamMoi()
        {
            return sanPham.LayDanhSachSanPhamMoi();
        }

        public bool ThemSanPhamMoi(SanPhamDAL sp)
        {
            return sanPham.ThemSanPhamMoi(sp);
        }

        public List<SanPhamDAL> LayDSSanPhamTheoMaLoai(string maLoai)
        {
            return sanPham.LayDSSanPhamTheoMaLoai(maLoai);
        }
        //ThuHien
        public List<SanPhamDAL> TimspTheoTen(string ten)
        {
            return sanPham.TimSPTheoTen(ten);
        }
        public List<SanPhamDAL> TimSPNangCao(string ten, string maLoaiSP, float giaThap, float giaCao)
        {
            return sanPham.TimSPNangCao(ten, maLoaiSP, giaThap, giaCao);
        }
        public bool SuaSP(SanPhamDAL sp)
        {
            return sanPham.SuaSP(sp);
        }
        public bool XoaSP(SanPhamDAL sp)
        {
            return sanPham.XoaSP(sp);
        }

        public SanPhamDAL LaySanPhamTheoMaSP(string masp)
        {
            return sanPham.LaySanPhamTheoMaSP(masp);
        }

        public List<SanPhamDAL> LayDSSanPhamTheoMaDH(string madonhang)
        {
            return sanPham.LayDSSanPhamTheoMaDH(madonhang);
        }
    }
}
